package cn.exrick.xboot.modules.transport.mapper;

import cn.exrick.xboot.modules.transport.param.QueryOrdersParam;
import cn.exrick.xboot.modules.transport.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.exrick.xboot.modules.transport.entity.Orders;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单表数据处理层
 * @author gj
 */
public interface OrdersMapper extends BaseMapper<Orders> {

    OrdersVo getOrderById(@Param("id") Long id);

    IPage<OrdersOutlineVo> getByCondition(@Param("page") Page page, @Param("param") QueryOrdersParam param);

    /**
     *
     * @param status
     * @param startTime
     * @param endTime
     * @param groupBy
     * @return
     */
    List<OrdersReportVo> getOrderStatistics(String status, String startTime, String endTime,String groupBy,Long warehouseId);

    List<PayableReportVo> getPayableReport(String reportDate,Long warehouseId);

    List<ReceivableReportVo> getReceivableReport(String reportDate);

    List<IncomeReportVo> getIncomeReport(String reportDate);
}